package com.dksidana.java.jdbc.bean;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.List;

import com.dksidana.java.jdbc.core.ResultSetHandler;

public class BeanArrayResultSetHandler<T>  implements ResultSetHandler<List<T>>{

	private final Class<T> type;
	public BeanArrayResultSetHandler(Class<T> type) {
		this.type=type;
	}
	public List<T> handleResultSet(ResultSet resultSet) throws SQLException {
		return BeanHandler.toBeanList(resultSet, type);
	}
}
